<?php
header("Content-Type: text/html; charset=ISO-8859-1", true);
if (!isset($_SESSION))
    session_start();
if (!isset($_SESSION['usuario'])) {
    session_destroy();
    header("location:index.php");
    exit;
}

include 'classes/classeVisualizar.php';
/* include 'classes/crud.php';
  //include 'classes/funcionario.php';
  $grupo=$_SESSION['grupo'];
  $id_fk = $_SESSION['id_funcionario'];
  $con = new Crud();
  $con->connect();
  $sql = mysql_query("SELECT a.nome , c.nome FROM arquivo as a inner join conteudo as c on a.fk_item=c.id_item
  where fk_item ='$id1'");
  $result = mysql_num_rows($sql);
  var_dump($sql, $result);
  if ($result == 1){
  echo "123";
  }else{
  echo "1";
  }

 */

$vizual = new classeVisualizar();
//echo $vizual->vizual();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Documentos</title>



        <style type="text/css">
            body,td,th {
                font-family: Verdana, Geneva, sans-serif;
                font-size: 12px;
                color: #000;
                background-color: #000;
            }

            body {
                margin-left: 0px;
                margin-top: 0px;
            }

            #fundo {
                width: 972px;
                height: 730px;
                left: 50%;
                margin-left: -486px;
                position: absolute;
                background-color: #CCC;
                top: 5px;
            }
            #imagem {
                position:absolute;
                width:890px;
                height:700px;
                z-index:1;
                overflow: auto;
                left: 50%;
                margin-left: -450px;
            }
            a:link {
                color: #000;
                text-decoration: none;
            }
            a:visited {
                color: #000;
                text-decoration: none;
            }
            a:hover {
                font-size: 12px;
                font-weight: bolder;
                color: #000;
                text-decoration: none;
            }
            #fundo .sp{
                font-family: Georgia, "Times New Roman", Times, serif;
                font-size: 12px;
                font-weight: bold;
                text-decoration: none;
                cursor: pointer;
            }
            #fundo .sp:hover{
                font-size:14px;
                font-style:normal;
                color: #00C;
                text-decoration: none;
                cursor: pointer;
            }
            #botes {
                position: absolute;
                left: 935px;
                height: 320px;
                cursor: pointer;
                top: 196px;
                width: 31px;
            }
            #link {
                position: absolute;
                left: 926px;
                top: 9px;
                text-decoration: none;
                color: #000;
                cursor: pointer;
                width: 63px;
            }
            #msg {
                color: #F00;
                text-decoration: blink;
                font-size: 20px;
                font-family: Arial, Helvetica, sans-serif;
                font-weight: bold;
            }
        </style>

        <script type="text/javascript" src="js/jscript.js"></script>
        <script type="text/javascript" src="js/jquery-1.5.1.js"></script>
    </head>

    <body>

        <script>
            $(function(){
                $('.z').hide();

                $('.sp').click(function(){
                    $(this).next().toggle('callback'); 
		 
			 
		
	
                });

	
            });



        </script>

        <div id="fundo">
            <?php
            if ($vizual->checkin())
                echo "<div id=\"msg\">
<center>DOCUMENTO EM CHECK-IN</center>
</div> <!--fim do div msg-->";
            $chek = 1;
            ?>
            <script type="text/javascript">
                $(function(){
                    var a = '<?php echo $chek; ?>';
                    var n = '<?php echo $_SESSION[nome]; ?>';
                    $('.clk').click(function(){
	
	
	
                    });
                });
            </script>



            <div id="imagem">
<?php echo $vizual->abrir_a(); ?>
            </div><!--Fim do div imagem-->


            <div id="botes">
                <?php
                $id_conteudo = $_GET[id];
                echo "<p><a href='#' class=\"clk\" ><img src=\"img/print.png\" title=\"imprimir\" class=\"img\" />&nbsp;</a></p>";
                echo "<p><a href=\"javascript:popw('ccpQuery.php?acao=copia&id_c=$id_conteudo');\"><img src=img/copy.png title=copiar class=img /></a></p>";
                echo "<p><a href='ccpQuery.php?acao=excluir&id_c=$id_conteudo'><img src=img/del.png title=apagar class=img /></a></p>";
                echo "<p><a href='ccpQuery.php?acao=mover&id_c=$id_conteudo'><img src=img/mover.png title=mover class=img /></a></p>";
                echo "<p><a href=# onclick=window.location='check.php?acao=check&id_c=$id_conteudo'><img src=img/checkin.png title=Check-in/Check-Out class=img /></a></p>";
                ?>

            </div><!--fim do div botoes-->


            <div id="link">
                <a href="#" onclick="window.close()";>Fechar</a></div><!-- fim do div link-->


        </div><!-- fim do div fundo-->    

    </body>

</html>
